package com.example.service.impl;

import java.util.Arrays;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.example.dao.CountryDao;
import com.example.model.Country;
import com.example.model.query.CountryExample;
import com.example.service.CountryService;


/**
 * Created on 2017/12/26 18:50
 */
@Service
public class CountryServiceImpl implements CountryService {

    @Autowired
	private CountryDao countryDao;

    @Transactional(readOnly = true)
    public Country selectByPrimaryKey(Short id) {
        return countryDao.selectByPrimaryKey(id);
    }

	@Transactional(readOnly = true)
	public List<Country> selectByExample(CountryExample q) {
		return countryDao.selectByExample(q);
	}

	@Transactional
	public Object insert(Country t) {
		return countryDao.insert(t);
	}

	@Transactional
	public Object insertSelective(Country t) {
		return countryDao.insertSelective(t);
	}

	@Transactional
	public Object updateByPrimaryKeySelective(Country t) {
		return countryDao.updateByPrimaryKeySelective(t);
	}

	@Transactional
	public Object updateByExampleSelective(Country t, CountryExample q) {
		return countryDao.updateByExampleSelective(t, q);
	}

	@Transactional
	public Object updateByExample(Country t, CountryExample q) {
		return countryDao.updateByExample(t, q);
	}

    @Transactional
    public Object updateByPrimaryKey(Country t) {
        return countryDao.updateByPrimaryKey(t);
    }

	@Transactional(readOnly = true)
	public Long countByExample(CountryExample q) {
		return countryDao.countByExample(q);
	}

    @Transactional
    public Integer deleteByPrimaryKey(Short id) {
        return countryDao.deleteByPrimaryKey(id);
    }



	@Transactional
	public Integer deleteByExample(CountryExample q) {
		return countryDao.deleteByExample(q);
	}

}
